import { defineStore } from "pinia";
import type { TeamInfo } from "@/api/team/type";

export const useTeamStore = defineStore("team", {
  state: () => ({
    teamInfo: null as TeamInfo | null
  }),
  actions: {
    // 加载
    load(teamInfo: TeamInfo) {
      this.teamInfo = teamInfo;
    },
    // 退出
    exit() {
      this.teamInfo = null;
    }
  }
});
